//
//  BRLanguageManager.h
//  BrezzeSaaS
//
//  Created by IOS on 2021/9/11.
//  Copyright © 2021 Brezze GWG. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@class BRLanguageModel;
@interface BRLanguageManager : NSObject

+ (instancetype)share;
/// 语言代号
@property (nonatomic,copy) NSString *language;
/// 语言描述 中文、English..
@property (nonatomic,copy) NSString *describe;
/// 是否中文,用于国家码字段选取
@property (nonatomic,assign) BOOL isChinese;

/// 支持的语言描述列表 @[describe]
@property (nonatomic,strong) NSArray *languageDescribes;

/// 支持的语言描述列表
@property (nonatomic,strong) NSArray <BRLanguageModel *>*languages;
/// 请求用的语言Str
@property (nonatomic,copy) NSString *requestStr;

/// 获取对于表下语言的String
/// @param key key
/// @param table 表
- (NSString *)stringWithLanguageKey:(NSString *)key table:(NSString *)table;

/// 获取对应语言的String
/// @param key key
- (NSString *)stringWithLanguageKey:(NSString *)key;

/// 设置语言
/// @param language en
- (void)setNewLanguage:(NSString *)language;
- (void)setNewLanguage:(NSString *)language changeNew:(BOOL)newWindow;

/// 告知后台当前语言
- (void)request:(NSString *)la;
/// 匹配语言key
+ (NSString *)br_languageKey:(NSString *)key inArr:(NSArray *)arr;

@end

@interface BRLanguageModel : BRBaseModel
/// 语言
@property (nonatomic,copy) NSString *language;
/// 用于请求传值
@property (nonatomic,copy) NSString *languageRequestStr;
/// 描述
@property (nonatomic,copy) NSString *describe;



@end

/// 多语言key model
@interface BRLanguageKeyModel : BRBaseModel
/// 英文
@property (nonatomic,copy) NSString *en;
/// 越南语
@property (nonatomic,copy) NSString *vn;
@property (nonatomic,copy) NSString *vi;
/// 中文
@property (nonatomic,copy) NSString *zh;

@property (nonatomic,copy) NSString *de;
@property (nonatomic,copy) NSString *fr;
/// 西班牙
@property (nonatomic,copy) NSString *es;


@end

NS_ASSUME_NONNULL_END
